1. Field of the Invention
The present invention relates generally to a method for manipulating edges in an image and more specifically for creating and using nth bitted patterns to facilitate image processing.
2. Description of the Prior Art
One approach to making raster characters look better is a technique referred to as "nth-bitting." Nth bitting can be used to align an edge of a font or a graphic object to a partial-pixel boundary by turning on selected pixels disposed along the edge. For example, half-bitting, a technique for aligning edges to half-pixel boundaries by turning on alternate pixels along an edge, is currently used in the rasterization of characters. As illustrated in U.S. patent application Ser. No. 07/416,211, entitled "Rapid Halfbitting Stepper," filed Oct. 2, 1989, the relevant portions of which are incorporated herein by reference, half bitting is employed to increase the width of a line by one half of a pixel. In practice, nth-bitting techniques serve to increase the effective addressability of an output device, such as a high resolution graphics display unit or a printer, and can be performed with lines that are relatively close to either horizontal or vertical.
Picture degradation in raster scan displays caused by aliasing presents the image of "jaggy" or "staircase" appearance of lines and edges. The following patents are directed toward just a few of the antialiasing techniques which have been proposed.
U.S. Pat. No. 4,808,984 Patentee: Trueblood et al. Issued: Feb. 28, 1989
U.S. Pat. No. 4,873,515 Patentee: Dickson et al. Issued: Oct. 10, 1989
U.S. Pat. No. 4,907,282 Patentee: Daly et al. Issued: Mar. 6, 1990
U.S. Pat. No. 4,918,626 Patentee: Watkins et al. Issued: Apr. 17, 1990
U.S. Pat. No. 4,808,984 discloses a computer generated graphic display system of the type which generates image display data including data representing the intensity of each pixel of the display, a raster scan graphic display for displaying the image data, and antialiasing means. An improvement to the computer generated graphic display system comprises gamma correction means supplied with antialiased display data for correcting of nonlinearity in the relationship between the pixel intensity data and the actual intensity of the corresponding pixel of the raster scan display.
U.S. Pat. No. 4,873,515 discloses an invention based on the recognition that lines and edges in a computer-graphics raster display can be made to appear smoother by widening the line to incorporate several pixels and varying the intensity of the pixels in an averaging or filtering process. The filtering process has the effect of shading or leathering the line to accomplish an antialiasing improvement. In general, a pixel processing system is provided for reducing undesirable jagged effects by expanding the number of pixels involved in the presentation of a line.
U.S. Pat. No. 4,907,282 discloses a method and apparatus for creating and storing characters for display on a video screen. The shape of the graphic character is displayed at various degrees of resolution. The graphic character is stored as a bitmap or as coefficients of spline curves. These can be scaled up or down to give different character sizes. The coefficients can be converted to form pixelmaps which are rectangular arrays of pixels. The pixelmaps may have gray scale values.
U.S. Pat. No. 4,918,626 discloses a process or product for resolving priority between polygons contending for individual areas in a display, e.g. pixels or subpixels. Priority is resolved by defining the edge where the planes of the two polygons intersect, then by applying a simple test of sign values after transforming the edge to the space of the display screen and determining the slope of such an edge. Along with resolving priority between contending polygons, the system, as disclosed, filters the pixel data. Accordingly, the system facilitates production of relatively clean, sharp edges in a video graphics raster scan display.
The following reference discloses an algorithm for creating subpixel masks to perform antialiasing of edges automatically:
Schilling "A New Simple and Efficient Antialiasing with Subpixel Masks" Computer Graphics, Volume 25, Number 4, July 1991 pp. 133-141 PA1 providing first and second template scanlines to the first group of template scanlines and third and fourth template scanlines to the second group of template scanlines; PA1 setting a first selected number of pixels in the first template scanline to the second output state; PA1 setting a first selected number of pixels in the third template scanline to the second output state, the pixels with the second output state in the first scanline being offset relative to the pixels with the second output state in the third scanline; PA1 setting a second selected number of pixels in the second template scanline to the second output state; and PA1 setting a second selected number of pixels in the fourth template scanline to the second output state, the second selected number of pixels being different than the first selected number of pixels. PA1 setting a first set of dispersed pixels disposed along the edge of the first object to the second output state; PA1 setting a second set of dispersed pixels disposed along the edge of the second graphic object to the second output state; and PA1 superposing the edge of the first object with the edge of the second object so that the first set of pixels is intermeshed with the second set of pixels to form a partial pixel boundary between the first object and the second boundary. PA1 dividing each of the first, second and third pixels into respective first, second and third grids, each of the grids comprising a matrix of n.times.n subpixels, each subpixel possessing a selected one of at least a first output state and a second output state; PA1 providing a template scanline of n subpixels, c of the n subpixels in the template scanline being set to the second output state; PA1 setting d subpixels in the first and second grids to the second output state so that respective edges are formed by the d subpixels in the first and second grids; PA1 setting e subpixels in the third grid to the second output state; and PA1 using the template scanline for setting c subpixels along the edge in the second grid to the second output state so that the second pixel serves as a transitional pixel between the first pixel and the third pixel to facilitate antialiasing.
The Schilling article discloses a method and an apparatus for selectively turning on subpixels of a pixel disposed along the edge of an object. This method serves to solve a problem in which individual subpixels of the pixel cannot be selectively turned on automatically. In the approach of the article, the exact portion covered by the edge of the object can be calculated, on a pixel-by-pixel basis, and a suitable number of subpixels turned on. For example, in an edge pixel divided into a 4.times.4 array of subpixels, if the edge only covers 2/16 of the pixel, a coverage of 2 subpixels, instead of 0 or 4 subpixels, can be obtained readily.
Under current technology nth bitting can be difficult and costly to perform. It would be desirable to provide an inexpensive and simple technique for readily nth bitting an edge of any font or graphic object. Moreover, while the approach of Schilling represents an improved approach in the area of antialiasing, it would still be desirable to provide an alternative approach that makes antialiasing as simple and inexpensive as possible.